package com.northming.daytodo.mapper.graph;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.northming.daytodo.domain.graph.GraphInfo;
import com.northming.daytodo.domain.graph.GraphItem;
import com.northming.daytodo.domain.graph.GraphTodo;
import com.northming.daytodo.domain.graph.UserGraph;

@Mapper
public interface GraphMapper {

	public List<GraphInfo> getGraphList(@Param("type")String type,@Param("status")int status);

	public GraphInfo getGraphInfo(@Param("id")Integer id);

	public List<GraphItem> getGraphItems(@Param("graphId")Integer graphId,@Param("status")int status);

	public boolean isGraphUsed(@Param("graphId")Integer graphId, @Param("userId")Integer userId,@Param("status")int status);

	public int insertUserGraph(UserGraph userGraph);

	public int getGraphToDoSize(@Param("graphId")Integer graphId, @Param("userId")Integer userId,@Param("sourceId")Integer sourceId);

	public List<GraphTodo> getGraphTodos(@Param("graphId")Integer graphId, @Param("userId")Integer userId,@Param("sourceId")Integer sourceId);

	public List<GraphTodo> getLastGraphItems(@Param("graphId")Integer graphId,@Param("status")int status);

	public GraphItem getGraphItem(@Param("id")Integer id);

	public List<GraphInfo> getMyGraphList(@Param("userId")Integer userId, @Param("status")int status);
	

}
